package sobchak;

import sobchak.ui.Tajikiston;

/**
 * Created by IntelliJ IDEA.
 * User: Admin
 * Date: 21.05.11
 * Time: 7:58
 * To change this template use File | Settings | File Templates.
 */
public class RunMe {
    
    public static void main(String... args) throws ClassNotFoundException, IllegalAccessException, InstantiationException {

        if (args.length != 1)
            throw new RuntimeException("Incorrect parameters count or parameter value");

        Class c = Class.forName(args[0]);

        Object o = c.newInstance();

        if (!(o instanceof Nacyianika))
            throw new RuntimeException(c.getName() + "is not an instance of " + Nacyianika.class.getName());


        Tajikiston taj = new Tajikiston();
        taj.setNaciaynika((Nacyianika) o);
        taj.initListners();
        taj.setVisible(true);
    }
    
}
